package com.example.gateway;


import com.example.common.core.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

@RestController
@RequestMapping("/test")
public class DemoController {

    @RequestMapping("/time")
    public Result<Object> time(LocalDateTime datetime) {
        System.out.println("datetime = " + datetime);
        return Result.success(datetime);
    }

    @RequestMapping("/error")
    public Result<Object> time() {
        throw new RuntimeException("测试");
    }
}
